﻿using System.IO;
using System.Text;

namespace Muzo.Core.Helpers
{
    public class FileHelper
    {
        /// <summary>
        /// Reads all content from file with utf8 encoding
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static string GetText(string path)
        {
            return File.ReadAllText(path, Encoding.UTF8);
        }

        /// <summary>
        /// Writes all content to file with utf8 encoding
        /// </summary>
        /// <param name="path"></param>
        /// <param name="content"></param>
        public static void SetText(string path, string content)
        {
            File.WriteAllText(path, content, Encoding.UTF8);
        }
    }
}
